package com.example.module_main.ui.splash

import com.example.lib_common.base.BaseViewModel
import com.example.module_main.http.MainApi
import com.example.module_main.model.AdModel
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class SplashViewModel @Inject constructor(private val repository: SplashRepository):BaseViewModel() {

    var mAppStartAdInfo:AdModel?=null
   /*
   广告数据
    */
    fun adList(){
        execute(
            action = repository.adList(),
            onFinish = {
                mAppStartAdInfo=it.data.firstOrNull()
            }
        )
    }
}